﻿using Game;
using Mekiasm.Machines;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Mekiasm.Machine
{
    public class MetallurgicInfuserWidget : BaseEnergyWidget
    {
        public ComponentEnergyMachine Machine;
        public MetallurgicInfuserWidget(ComponentEnergyMachine machine, ComponentMiner miner) : base(miner)
        {
            Machine = machine;
            MekCraftingRecipe.FindCraftDevice(typeof(MetallurgicInfuser)).GenerateRecipeWidget(CanvasMain,machine,miner,ref Tick);
        }
        public override void Update()
        {
            Tick?.Invoke();
            SetPowerProgress((float)Machine.Power / Machine.MaxPower);
        }
    }
}
